<?php
/**
 * Created by PhpStorm.
 * User: idcu
 * Date: 2016/3/18
 * Time: 23:52
 */
namespace Crm\Model;
use IDCU\Model\RelationModel;

class RoleModel extends RelationModel
{
    protected $_link = array(
        'User' => array(
            'mapping_type'          => self::MANY_TO_MANY,
            'class_name'            => 'User',
            'mapping_name'          => 'user',
            'foreign_key'           => 'role_id',
            'relation_foreign_key'  => 'user_id',
            'relation_table'        => 'zh_role_user',
        ),
    );
}